package com.zcmob.web.admanagement.util;

import java.io.File;

public class RenameFor9 {

    public static void main(String[] args) {
        String dir = "D:\\workspace\\sdk_assets\\";

        for (File image : new File(dir).listFiles()) {
            if (image.getName().endsWith(".9.png") || image.getName().endsWith(".9.jpg")) {
                String des = dir + image.getName().substring(0, image.getName().length() - 6) + image.getName().substring(image.getName().length() - 4, image.getName().length());
                System.out.println(des);
                image.renameTo(new File(des));
            }

        }
    }
}
